<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>JsMessage.Builder (Closure Compiler)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="JsMessage.Builder (Closure Compiler)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/javascript/jscomp/JsMessage.html" title="class in com.google.javascript.jscomp"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/google/javascript/jscomp/JsMessage.IdGenerator.html" title="interface in com.google.javascript.jscomp"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/javascript/jscomp/JsMessage.Builder.html" target="_top">Frames</a></li>
<li><a href="JsMessage.Builder.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.google.javascript.jscomp</div>
<h2 title="Class JsMessage.Builder" class="title">Class JsMessage.Builder</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.google.javascript.jscomp.JsMessage.Builder</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../com/google/javascript/jscomp/JsMessage.html" title="class in com.google.javascript.jscomp">JsMessage</a></dd>
</dl>
<hr>
<br>
<pre>public static class <span class="strong">JsMessage.Builder</span>
extends java.lang.Object</pre>
<div class="block">Contains functionality for creating JS messages. Generates authoritative
 keys and fingerprints for a message that must stay constant over time.

 This implementation correctly processes unnamed messages and creates a key
 for them that looks like MSG_<fingerprint value>.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#JsMessage.Builder()">JsMessage.Builder</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#JsMessage.Builder(java.lang.String)">JsMessage.Builder</a></strong>(java.lang.String&nbsp;key)</code>
<div class="block">Creates an instance.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#appendPlaceholderReference(java.lang.String)">appendPlaceholderReference</a></strong>(java.lang.String&nbsp;name)</code>
<div class="block">Appends a placeholder reference to the message</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#appendStringPart(java.lang.String)">appendStringPart</a></strong>(java.lang.String&nbsp;part)</code>
<div class="block">Appends a translatable string literal to the message.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.html" title="class in com.google.javascript.jscomp">JsMessage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#build()">build</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.html" title="class in com.google.javascript.jscomp">JsMessage</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#build(com.google.javascript.jscomp.JsMessage.IdGenerator)">build</a></strong>(<a href="../../../../com/google/javascript/jscomp/JsMessage.IdGenerator.html" title="interface in com.google.javascript.jscomp">JsMessage.IdGenerator</a>&nbsp;idGenerator)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#getKey()">getKey</a></strong>()</code>
<div class="block">Gets the message's key (e.g.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.CharSequence&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#getParts()">getParts</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.Set&lt;java.lang.String&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#getPlaceholders()">getPlaceholders</a></strong>()</code>
<div class="block">Returns the message registered placeholders</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#hasParts()">hasParts</a></strong>()</code>
<div class="block">Gets whether at least one part has been appended.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#setDesc(java.lang.String)">setDesc</a></strong>(java.lang.String&nbsp;desc)</code>
<div class="block">Sets the description of the message, which helps translators.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#setIsHidden(boolean)">setIsHidden</a></strong>(boolean&nbsp;hidden)</code>
<div class="block">Sets whether the message should be hidden from volunteer translators.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#setKey(java.lang.String)">setKey</a></strong>(java.lang.String&nbsp;key)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#setMeaning(java.lang.String)">setMeaning</a></strong>(java.lang.String&nbsp;meaning)</code>
<div class="block">Sets the programmer-specified meaning of this message, which
 forces this message to translate differently.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a></code></td>
<td class="colLast"><code><strong><a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html#setSourceName(java.lang.String)">setSourceName</a></strong>(java.lang.String&nbsp;sourceName)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="JsMessage.Builder()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>JsMessage.Builder</h4>
<pre>public&nbsp;JsMessage.Builder()</pre>
</li>
</ul>
<a name="JsMessage.Builder(java.lang.String)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>JsMessage.Builder</h4>
<pre>public&nbsp;JsMessage.Builder(java.lang.String&nbsp;key)</pre>
<div class="block">Creates an instance.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getKey()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKey</h4>
<pre>public&nbsp;java.lang.String&nbsp;getKey()</pre>
<div class="block">Gets the message's key (e.g. <code>"MSG_HELLO"</code>).</div>
</li>
</ul>
<a name="setKey(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setKey</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a>&nbsp;setKey(java.lang.String&nbsp;key)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - a key that should uniquely identify this message; typically
     it is the message's name (e.g. <code>"MSG_HELLO"</code>).</dd></dl>
</li>
</ul>
<a name="setSourceName(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSourceName</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a>&nbsp;setSourceName(java.lang.String&nbsp;sourceName)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sourceName</code> - The message's sourceName.</dd></dl>
</li>
</ul>
<a name="appendPlaceholderReference(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>appendPlaceholderReference</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a>&nbsp;appendPlaceholderReference(java.lang.String&nbsp;name)</pre>
<div class="block">Appends a placeholder reference to the message</div>
</li>
</ul>
<a name="appendStringPart(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>appendStringPart</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a>&nbsp;appendStringPart(java.lang.String&nbsp;part)</pre>
<div class="block">Appends a translatable string literal to the message.</div>
</li>
</ul>
<a name="getPlaceholders()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlaceholders</h4>
<pre>public&nbsp;java.util.Set&lt;java.lang.String&gt;&nbsp;getPlaceholders()</pre>
<div class="block">Returns the message registered placeholders</div>
</li>
</ul>
<a name="setDesc(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDesc</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a>&nbsp;setDesc(java.lang.String&nbsp;desc)</pre>
<div class="block">Sets the description of the message, which helps translators.</div>
</li>
</ul>
<a name="setMeaning(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMeaning</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a>&nbsp;setMeaning(java.lang.String&nbsp;meaning)</pre>
<div class="block">Sets the programmer-specified meaning of this message, which
 forces this message to translate differently.</div>
</li>
</ul>
<a name="setIsHidden(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setIsHidden</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.Builder.html" title="class in com.google.javascript.jscomp">JsMessage.Builder</a>&nbsp;setIsHidden(boolean&nbsp;hidden)</pre>
<div class="block">Sets whether the message should be hidden from volunteer translators.</div>
</li>
</ul>
<a name="hasParts()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasParts</h4>
<pre>public&nbsp;boolean&nbsp;hasParts()</pre>
<div class="block">Gets whether at least one part has been appended.</div>
</li>
</ul>
<a name="getParts()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParts</h4>
<pre>public&nbsp;java.util.List&lt;java.lang.CharSequence&gt;&nbsp;getParts()</pre>
</li>
</ul>
<a name="build()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>build</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.html" title="class in com.google.javascript.jscomp">JsMessage</a>&nbsp;build()</pre>
</li>
</ul>
<a name="build(com.google.javascript.jscomp.JsMessage.IdGenerator)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>build</h4>
<pre>public&nbsp;<a href="../../../../com/google/javascript/jscomp/JsMessage.html" title="class in com.google.javascript.jscomp">JsMessage</a>&nbsp;build(<a href="../../../../com/google/javascript/jscomp/JsMessage.IdGenerator.html" title="interface in com.google.javascript.jscomp">JsMessage.IdGenerator</a>&nbsp;idGenerator)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/google/javascript/jscomp/JsMessage.html" title="class in com.google.javascript.jscomp"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../com/google/javascript/jscomp/JsMessage.IdGenerator.html" title="interface in com.google.javascript.jscomp"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/google/javascript/jscomp/JsMessage.Builder.html" target="_top">Frames</a></li>
<li><a href="JsMessage.Builder.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
